package com.rr.sc.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.rr.sc.model.Category;

@Repository
public interface CategoryDao {
    public void saveOrUpdate(Category category);

    public Category get(Long id);

    public void delete(Category category);

    /**
     * @param userIds
     * @param onlyRoots
     *            specifies if returns only the categories with null parent
     * @return
     */
    public List<Category> getByUserId(List<Long> userIds, boolean onlyRoots);

    public List<Category> getByUserIdAndName(List<Long> userIds, String name);

    public void check(Category category);
}
